# coding:utf-8
'''
Created on 2011-3-13
重新定向stderr。。
@author: Administrator
'''
import sys

fsock = open('F:/Temp/python.log', 'a')
sys.stderr = fsock
raise Exception, 'this error will be logged'